\(\int \frac {(A+B \sin (e+f x)) (c-c \sin (e+f x))^4}{(a+a \sin (e+f x))^2} \, dx\) [61]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [B] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 36, antiderivative size = 180 \[ \int \frac {(A+B \sin (e+f x)) (c-c \sin (e+f x))^4}{(a+a \sin (e+f x))^2} \, dx=\frac {35 (A-2 B) c^4 x}{2 a^2}+\frac {35 (A-2 B) c^4 \cos ^3(e+f x)}{3 a^2 f}+\frac {35 (A-2 B) c^4 \cos (e+f x) \sin (e+f x)}{2 a^2 f}-\frac {a^4 (A-B) c^4 \cos ^9(e+f x)}{3 f (a+a \sin (e+f x))^6}+\frac {2 a^2 (A-2 B) c^4 \cos ^7(e+f x)}{f (a+a \sin (e+f x))^4}+\frac {14 (A-2 B) c^4 \cos ^5(e+f x)}{f (a+a \sin (e+f x))^2} \]

[Out]

35/2*(A-2*B)*c^4*x/a^2+35/3*(A-2*B)*c^4*cos(f*x+e)^3/a^2/f+35/2*(A-2*B)*c^4*cos(f*x+e)*sin(f*x+e)/a^2/f-1/3*a^
4*(A-B)*c^4*cos(f*x+e)^9/f/(a+a*sin(f*x+e))^6+2*a^2*(A-2*B)*c^4*cos(f*x+e)^7/f/(a+a*sin(f*x+e))^4+14*(A-2*B)*c
^4*cos(f*x+e)^5/f/(a+a*sin(f*x+e))^2

Rubi [A] (verified)

Time = 0.24 (sec) , antiderivative size = 180, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3046, 2938, 2759, 2761, 2715, 8} \[ \int \frac {(A+B \sin (e+f x)) (c-c \sin (e+f x))^4}{(a+a \sin (e+f x))^2} \, dx=-\frac {a^4 c^4 (A-B) \cos ^9(e+f x)}{3 f (a \sin (e+f x)+a)^6}+\frac {35 c^4 (A-2 B) \cos ^3(e+f x)}{3 a^2 f}+\frac {2 a^2 c^4 (A-2 B) \cos ^7(e+f x)}{f (a \sin (e+f x)+a)^4}+\frac {35 c^4 (A-2 B) \sin (e+f x) \cos (e+f x)}{2 a^2 f}+\frac {35 c^4 x (A-2 B)}{2 a^2}+\frac {14 c^4 (A-2 B) \cos ^5(e+f x)}{f (a \sin (e+f x)+a)^2} \]

[In]

Int[((A + B*Sin[e + f*x])*(c - c*Sin[e + f*x])^4)/(a + a*Sin[e + f*x])^2,x]

[Out]

(35*(A - 2*B)*c^4*x)/(2*a^2) + (35*(A - 2*B)*c^4*Cos[e + f*x]^3)/(3*a^2*f) + (35*(A - 2*B)*c^4*Cos[e + f*x]*Si
n[e + f*x])/(2*a^2*f) - (a^4*(A - B)*c^4*Cos[e + f*x]^9)/(3*f*(a + a*Sin[e + f*x])^6) + (2*a^2*(A - 2*B)*c^4*C
os[e + f*x]^7)/(f*(a + a*Sin[e + f*x])^4) + (14*(A - 2*B)*c^4*Cos[e + f*x]^5)/(f*(a + a*Sin[e + f*x])^2)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 2715

Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d*x]*((b*Sin[c + d*x])^(n - 1)/(d*n))
, x] + Dist[b^2*((n - 1)/n), Int[(b*Sin[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && Integ
erQ[2*n]

Rule 2759

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Simp[2*g*(g
*Cos[e + f*x])^(p - 1)*((a + b*Sin[e + f*x])^(m + 1)/(b*f*(2*m + p + 1))), x] + Dist[g^2*((p - 1)/(b^2*(2*m +
p + 1))), Int[(g*Cos[e + f*x])^(p - 2)*(a + b*Sin[e + f*x])^(m + 2), x], x] /; FreeQ[{a, b, e, f, g}, x] && Eq
Q[a^2 - b^2, 0] && LeQ[m, -2] && GtQ[p, 1] && NeQ[2*m + p + 1, 0] &&  !ILtQ[m + p + 1, 0] && IntegersQ[2*m, 2*
p]

Rule 2761

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)/((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[g*((g*Cos[e
 + f*x])^(p - 1)/(b*f*(p - 1))), x] + Dist[g^2/a, Int[(g*Cos[e + f*x])^(p - 2), x], x] /; FreeQ[{a, b, e, f, g
}, x] && EqQ[a^2 - b^2, 0] && GtQ[p, 1] && IntegerQ[2*p]

Rule 2938

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.)
+ (f_.)*(x_)]), x_Symbol] :> Simp[(b*c - a*d)*(g*Cos[e + f*x])^(p + 1)*((a + b*Sin[e + f*x])^m/(a*f*g*(2*m + p
 + 1))), x] + Dist[(a*d*m + b*c*(m + p + 1))/(a*b*(2*m + p + 1)), Int[(g*Cos[e + f*x])^p*(a + b*Sin[e + f*x])^
(m + 1), x], x] /; FreeQ[{a, b, c, d, e, f, g, m, p}, x] && EqQ[a^2 - b^2, 0] && (LtQ[m, -1] || ILtQ[Simplify[
m + p], 0]) && NeQ[2*m + p + 1, 0]

Rule 3046

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_) + (d_.)*sin[(e_
.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a^m*c^m, Int[Cos[e + f*x]^(2*m)*(c + d*Sin[e + f*x])^(n - m)*(A + B
*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && I
ntegerQ[m] &&  !(IntegerQ[n] && ((LtQ[m, 0] && GtQ[n, 0]) || LtQ[0, n, m] || LtQ[m, n, 0]))

Rubi steps \begin{align*} \text {integral}& = \left (a^4 c^4\right ) \int \frac {\cos ^8(e+f x) (A+B \sin (e+f x))}{(a+a \sin (e+f x))^6} \, dx \\ & = -\frac {a^4 (A-B) c^4 \cos ^9(e+f x)}{3 f (a+a \sin (e+f x))^6}-\left (a^3 (A-2 B) c^4\right ) \int \frac {\cos ^8(e+f x)}{(a+a \sin (e+f x))^5} \, dx \\ & = -\frac {a^4 (A-B) c^4 \cos ^9(e+f x)}{3 f (a+a \sin (e+f x))^6}+\frac {2 a^2 (A-2 B) c^4 \cos ^7(e+f x)}{f (a+a \sin (e+f x))^4}+\left (7 a (A-2 B) c^4\right ) \int \frac {\cos ^6(e+f x)}{(a+a \sin (e+f x))^3} \, dx \\ & = -\frac {a^4 (A-B) c^4 \cos ^9(e+f x)}{3 f (a+a \sin (e+f x))^6}+\frac {2 a^2 (A-2 B) c^4 \cos ^7(e+f x)}{f (a+a \sin (e+f x))^4}+\frac {14 (A-2 B) c^4 \cos ^5(e+f x)}{f (a+a \sin (e+f x))^2}+\frac {\left (35 (A-2 B) c^4\right ) \int \frac {\cos ^4(e+f x)}{a+a \sin (e+f x)} \, dx}{a} \\ & = \frac {35 (A-2 B) c^4 \cos ^3(e+f x)}{3 a^2 f}-\frac {a^4 (A-B) c^4 \cos ^9(e+f x)}{3 f (a+a \sin (e+f x))^6}+\frac {2 a^2 (A-2 B) c^4 \cos ^7(e+f x)}{f (a+a \sin (e+f x))^4}+\frac {14 (A-2 B) c^4 \cos ^5(e+f x)}{f (a+a \sin (e+f x))^2}+\frac {\left (35 (A-2 B) c^4\right ) \int \cos ^2(e+f x) \, dx}{a^2} \\ & = \frac {35 (A-2 B) c^4 \cos ^3(e+f x)}{3 a^2 f}+\frac {35 (A-2 B) c^4 \cos (e+f x) \sin (e+f x)}{2 a^2 f}-\frac {a^4 (A-B) c^4 \cos ^9(e+f x)}{3 f (a+a \sin (e+f x))^6}+\frac {2 a^2 (A-2 B) c^4 \cos ^7(e+f x)}{f (a+a \sin (e+f x))^4}+\frac {14 (A-2 B) c^4 \cos ^5(e+f x)}{f (a+a \sin (e+f x))^2}+\frac {\left (35 (A-2 B) c^4\right ) \int 1 \, dx}{2 a^2} \\ & = \frac {35 (A-2 B) c^4 x}{2 a^2}+\frac {35 (A-2 B) c^4 \cos ^3(e+f x)}{3 a^2 f}+\frac {35 (A-2 B) c^4 \cos (e+f x) \sin (e+f x)}{2 a^2 f}-\frac {a^4 (A-B) c^4 \cos ^9(e+f x)}{3 f (a+a \sin (e+f x))^6}+\frac {2 a^2 (A-2 B) c^4 \cos ^7(e+f x)}{f (a+a \sin (e+f x))^4}+\frac {14 (A-2 B) c^4 \cos ^5(e+f x)}{f (a+a \sin (e+f x))^2} \\ \end{align*}

Mathematica [A] (verified)

Time = 11.47 (sec) , antiderivative size = 311, normalized size of antiderivative = 1.73 \[ \int \frac {(A+B \sin (e+f x)) (c-c \sin (e+f x))^4}{(a+a \sin (e+f x))^2} \, dx=\frac {\left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right ) (c-c \sin (e+f x))^4 \left (128 (A-B) \sin \left (\frac {1}{2} (e+f x)\right )-64 (A-B) \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )-128 (5 A-8 B) \sin \left (\frac {1}{2} (e+f x)\right ) \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )^2+210 (A-2 B) (e+f x) \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )^3+3 (24 A-71 B) \cos (e+f x) \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )^3+B \cos (3 (e+f x)) \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )^3-3 (A-6 B) \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )^3 \sin (2 (e+f x))\right )}{12 a^2 f \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )^8 (1+\sin (e+f x))^2} \]

[In]

Integrate[((A + B*Sin[e + f*x])*(c - c*Sin[e + f*x])^4)/(a + a*Sin[e + f*x])^2,x]

[Out]

((Cos[(e + f*x)/2] + Sin[(e + f*x)/2])*(c - c*Sin[e + f*x])^4*(128*(A - B)*Sin[(e + f*x)/2] - 64*(A - B)*(Cos[
(e + f*x)/2] + Sin[(e + f*x)/2]) - 128*(5*A - 8*B)*Sin[(e + f*x)/2]*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2])^2 +
210*(A - 2*B)*(e + f*x)*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2])^3 + 3*(24*A - 71*B)*Cos[e + f*x]*(Cos[(e + f*x)/
2] + Sin[(e + f*x)/2])^3 + B*Cos[3*(e + f*x)]*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2])^3 - 3*(A - 6*B)*(Cos[(e +
f*x)/2] + Sin[(e + f*x)/2])^3*Sin[2*(e + f*x)]))/(12*a^2*f*(Cos[(e + f*x)/2] - Sin[(e + f*x)/2])^8*(1 + Sin[e
+ f*x])^2)

Maple [A] (verified)

Time = 1.12 (sec) , antiderivative size = 193, normalized size of antiderivative = 1.07

method result size
derivativedivides \(\frac {2 c^{4} \left (\frac {\left (\frac {A}{2}-3 B \right ) \left (\tan ^{5}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+\left (6 A -17 B \right ) \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+\left (12 A -36 B \right ) \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+\left (-\frac {A}{2}+3 B \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+6 A -\frac {53 B}{3}}{\left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )^{3}}+\frac {35 \left (A -2 B \right ) \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2}-\frac {-32 A +32 B}{2 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{2}}-\frac {-16 A +32 B}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1}-\frac {32 A -32 B}{3 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{3}}\right )}{f \,a^{2}}\) \(193\)
default \(\frac {2 c^{4} \left (\frac {\left (\frac {A}{2}-3 B \right ) \left (\tan ^{5}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+\left (6 A -17 B \right ) \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+\left (12 A -36 B \right ) \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )+\left (-\frac {A}{2}+3 B \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+6 A -\frac {53 B}{3}}{\left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )^{3}}+\frac {35 \left (A -2 B \right ) \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2}-\frac {-32 A +32 B}{2 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{2}}-\frac {-16 A +32 B}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1}-\frac {32 A -32 B}{3 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{3}}\right )}{f \,a^{2}}\) \(193\)
parallelrisch \(-\frac {21 c^{4} \left (\left (-20 f x A +40 f x B -\frac {277}{7} A +\frac {1712}{21} B \right ) \cos \left (\frac {f x}{2}+\frac {e}{2}\right )+\frac {\left (-40 f x B +20 f x A +\frac {290}{21} B -\frac {191}{21} A \right ) \cos \left (\frac {3 f x}{2}+\frac {3 e}{2}\right )}{3}+\left (-20 f x A +40 f x B -\frac {481}{21} A +\frac {928}{21} B \right ) \sin \left (\frac {f x}{2}+\frac {e}{2}\right )+\left (\frac {40}{3} f x B -\frac {20}{3} f x A -\frac {167}{7} A +\frac {2930}{63} B \right ) \sin \left (\frac {3 f x}{2}+\frac {3 e}{2}\right )+\left (-\frac {18 B}{7}+A \right ) \cos \left (\frac {5 f x}{2}+\frac {5 e}{2}\right )+\frac {\left (-A +5 B \right ) \cos \left (\frac {7 f x}{2}+\frac {7 e}{2}\right )}{21}+\left (-A +\frac {18 B}{7}\right ) \sin \left (\frac {5 f x}{2}+\frac {5 e}{2}\right )+\frac {\left (-A +5 B \right ) \sin \left (\frac {7 f x}{2}+\frac {7 e}{2}\right )}{21}+\frac {B \left (\cos \left (\frac {9 f x}{2}+\frac {9 e}{2}\right )-\sin \left (\frac {9 f x}{2}+\frac {9 e}{2}\right )\right )}{63}\right )}{8 f \,a^{2} \left (3 \cos \left (\frac {f x}{2}+\frac {e}{2}\right )-\cos \left (\frac {3 f x}{2}+\frac {3 e}{2}\right )+\sin \left (\frac {3 f x}{2}+\frac {3 e}{2}\right )+3 \sin \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}\) \(259\)
risch \(\frac {35 c^{4} x A}{2 a^{2}}-\frac {35 c^{4} x B}{a^{2}}+\frac {i c^{4} {\mathrm e}^{2 i \left (f x +e \right )} A}{8 a^{2} f}-\frac {3 i c^{4} {\mathrm e}^{2 i \left (f x +e \right )} B}{4 a^{2} f}+\frac {3 c^{4} {\mathrm e}^{i \left (f x +e \right )} A}{a^{2} f}-\frac {71 c^{4} {\mathrm e}^{i \left (f x +e \right )} B}{8 a^{2} f}+\frac {3 c^{4} {\mathrm e}^{-i \left (f x +e \right )} A}{a^{2} f}-\frac {71 c^{4} {\mathrm e}^{-i \left (f x +e \right )} B}{8 a^{2} f}-\frac {i c^{4} {\mathrm e}^{-2 i \left (f x +e \right )} A}{8 a^{2} f}+\frac {3 i c^{4} {\mathrm e}^{-2 i \left (f x +e \right )} B}{4 a^{2} f}+\frac {96 i A \,c^{4} {\mathrm e}^{i \left (f x +e \right )}+64 A \,c^{4} {\mathrm e}^{2 i \left (f x +e \right )}-160 i B \,c^{4} {\mathrm e}^{i \left (f x +e \right )}-96 B \,c^{4} {\mathrm e}^{2 i \left (f x +e \right )}-\frac {160 A \,c^{4}}{3}+\frac {256 B \,c^{4}}{3}}{f \,a^{2} \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )^{3}}+\frac {B \,c^{4} \cos \left (3 f x +3 e \right )}{12 a^{2} f}\) \(312\)
norman \(\frac {\frac {\left (111 A \,c^{4}-212 B \,c^{4}\right ) \left (\tan ^{11}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a f}+\frac {\left (33 A \,c^{4}-70 B \,c^{4}\right ) \left (\tan ^{12}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a f}+\frac {\left (979 A \,c^{4}-2004 B \,c^{4}\right ) \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{3 a f}+\frac {\left (1893 A \,c^{4}-3700 B \,c^{4}\right ) \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{3 a f}+\frac {35 c^{4} \left (A -2 B \right ) x}{2 a}+\frac {\left (131 A \,c^{4}-260 B \,c^{4}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{a f}+\frac {1225 c^{4} \left (A -2 B \right ) x \left (\tan ^{8}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 a}+\frac {875 c^{4} \left (A -2 B \right ) x \left (\tan ^{9}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 a}+\frac {280 c^{4} \left (A -2 B \right ) x \left (\tan ^{10}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a}+\frac {140 c^{4} \left (A -2 B \right ) x \left (\tan ^{11}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a}+\frac {105 c^{4} \left (A -2 B \right ) x \left (\tan ^{12}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 a}+\frac {105 c^{4} \left (A -2 B \right ) x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{2 a}+\frac {\left (571 A \,c^{4}-1084 B \,c^{4}\right ) \left (\tan ^{9}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a f}+\frac {\left (731 A \,c^{4}-1580 B \,c^{4}\right ) \left (\tan ^{10}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{3 a f}+\frac {875 c^{4} \left (A -2 B \right ) x \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 a}+\frac {1225 c^{4} \left (A -2 B \right ) x \left (\tan ^{5}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 a}+\frac {35 c^{4} \left (A -2 B \right ) x \left (\tan ^{13}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{2 a}+\frac {164 A \,c^{4}-330 B \,c^{4}}{3 a f}+\frac {700 c^{4} \left (A -2 B \right ) x \left (\tan ^{6}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a}+\frac {700 c^{4} \left (A -2 B \right ) x \left (\tan ^{7}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a}+\frac {140 c^{4} \left (A -2 B \right ) x \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a}+\frac {280 c^{4} \left (A -2 B \right ) x \left (\tan ^{3}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a}+\frac {\left (2387 A \,c^{4}-4998 B \,c^{4}\right ) \left (\tan ^{4}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{3 a f}+\frac {\left (3654 A \,c^{4}-7040 B \,c^{4}\right ) \left (\tan ^{5}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{3 a f}+\frac {2 \left (1513 A \,c^{4}-3232 B \,c^{4}\right ) \left (\tan ^{6}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{3 a f}+\frac {2 \left (1767 A \,c^{4}-3368 B \,c^{4}\right ) \left (\tan ^{7}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{3 a f}+\frac {\left (2086 A \,c^{4}-4510 B \,c^{4}\right ) \left (\tan ^{8}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{3 a f}}{\left (1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )^{5} a \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{3}}\) \(770\)

[In]

int((A+B*sin(f*x+e))*(c-c*sin(f*x+e))^4/(a+a*sin(f*x+e))^2,x,method=_RETURNVERBOSE)

[Out]

2/f*c^4/a^2*(((1/2*A-3*B)*tan(1/2*f*x+1/2*e)^5+(6*A-17*B)*tan(1/2*f*x+1/2*e)^4+(12*A-36*B)*tan(1/2*f*x+1/2*e)^
2+(-1/2*A+3*B)*tan(1/2*f*x+1/2*e)+6*A-53/3*B)/(1+tan(1/2*f*x+1/2*e)^2)^3+35/2*(A-2*B)*arctan(tan(1/2*f*x+1/2*e
))-1/2*(-32*A+32*B)/(tan(1/2*f*x+1/2*e)+1)^2-(-16*A+32*B)/(tan(1/2*f*x+1/2*e)+1)-1/3*(32*A-32*B)/(tan(1/2*f*x+
1/2*e)+1)^3)

Fricas [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 322, normalized size of antiderivative = 1.79 \[ \int \frac {(A+B \sin (e+f x)) (c-c \sin (e+f x))^4}{(a+a \sin (e+f x))^2} \, dx=\frac {2 \, B c^{4} \cos \left (f x + e\right )^{5} - {\left (3 \, A - 16 \, B\right )} c^{4} \cos \left (f x + e\right )^{4} + 2 \, {\left (15 \, A - 38 \, B\right )} c^{4} \cos \left (f x + e\right )^{3} - 210 \, {\left (A - 2 \, B\right )} c^{4} f x + 32 \, {\left (A - B\right )} c^{4} + {\left (105 \, {\left (A - 2 \, B\right )} c^{4} f x - {\left (193 \, A - 346 \, B\right )} c^{4}\right )} \cos \left (f x + e\right )^{2} - {\left (105 \, {\left (A - 2 \, B\right )} c^{4} f x + 2 \, {\left (97 \, A - 202 \, B\right )} c^{4}\right )} \cos \left (f x + e\right ) - {\left (2 \, B c^{4} \cos \left (f x + e\right )^{4} + {\left (3 \, A - 14 \, B\right )} c^{4} \cos \left (f x + e\right )^{3} + 210 \, {\left (A - 2 \, B\right )} c^{4} f x + 3 \, {\left (11 \, A - 30 \, B\right )} c^{4} \cos \left (f x + e\right )^{2} + 32 \, {\left (A - B\right )} c^{4} + {\left (105 \, {\left (A - 2 \, B\right )} c^{4} f x + 2 \, {\left (113 \, A - 218 \, B\right )} c^{4}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{6 \, {\left (a^{2} f \cos \left (f x + e\right )^{2} - a^{2} f \cos \left (f x + e\right ) - 2 \, a^{2} f - {\left (a^{2} f \cos \left (f x + e\right ) + 2 \, a^{2} f\right )} \sin \left (f x + e\right )\right )}} \]

[In]

integrate((A+B*sin(f*x+e))*(c-c*sin(f*x+e))^4/(a+a*sin(f*x+e))^2,x, algorithm="fricas")

[Out]

1/6*(2*B*c^4*cos(f*x + e)^5 - (3*A - 16*B)*c^4*cos(f*x + e)^4 + 2*(15*A - 38*B)*c^4*cos(f*x + e)^3 - 210*(A -
2*B)*c^4*f*x + 32*(A - B)*c^4 + (105*(A - 2*B)*c^4*f*x - (193*A - 346*B)*c^4)*cos(f*x + e)^2 - (105*(A - 2*B)*
c^4*f*x + 2*(97*A - 202*B)*c^4)*cos(f*x + e) - (2*B*c^4*cos(f*x + e)^4 + (3*A - 14*B)*c^4*cos(f*x + e)^3 + 210
*(A - 2*B)*c^4*f*x + 3*(11*A - 30*B)*c^4*cos(f*x + e)^2 + 32*(A - B)*c^4 + (105*(A - 2*B)*c^4*f*x + 2*(113*A -
 218*B)*c^4)*cos(f*x + e))*sin(f*x + e))/(a^2*f*cos(f*x + e)^2 - a^2*f*cos(f*x + e) - 2*a^2*f - (a^2*f*cos(f*x
 + e) + 2*a^2*f)*sin(f*x + e))

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 7337 vs. \(2 (175) = 350\).

Time = 12.86 (sec) , antiderivative size = 7337, normalized size of antiderivative = 40.76 \[ \int \frac {(A+B \sin (e+f x)) (c-c \sin (e+f x))^4}{(a+a \sin (e+f x))^2} \, dx=\text {Too large to display} \]

[In]

integrate((A+B*sin(f*x+e))*(c-c*sin(f*x+e))**4/(a+a*sin(f*x+e))**2,x)

[Out]

Piecewise((105*A*c**4*f*x*tan(e/2 + f*x/2)**9/(6*a**2*f*tan(e/2 + f*x/2)**9 + 18*a**2*f*tan(e/2 + f*x/2)**8 +
36*a**2*f*tan(e/2 + f*x/2)**7 + 60*a**2*f*tan(e/2 + f*x/2)**6 + 72*a**2*f*tan(e/2 + f*x/2)**5 + 72*a**2*f*tan(
e/2 + f*x/2)**4 + 60*a**2*f*tan(e/2 + f*x/2)**3 + 36*a**2*f*tan(e/2 + f*x/2)**2 + 18*a**2*f*tan(e/2 + f*x/2) +
 6*a**2*f) + 315*A*c**4*f*x*tan(e/2 + f*x/2)**8/(6*a**2*f*tan(e/2 + f*x/2)**9 + 18*a**2*f*tan(e/2 + f*x/2)**8
+ 36*a**2*f*tan(e/2 + f*x/2)**7 + 60*a**2*f*tan(e/2 + f*x/2)**6 + 72*a**2*f*tan(e/2 + f*x/2)**5 + 72*a**2*f*ta
n(e/2 + f*x/2)**4 + 60*a**2*f*tan(e/2 + f*x/2)**3 + 36*a**2*f*tan(e/2 + f*x/2)**2 + 18*a**2*f*tan(e/2 + f*x/2)
 + 6*a**2*f) + 630*A*c**4*f*x*tan(e/2 + f*x/2)**7/(6*a**2*f*tan(e/2 + f*x/2)**9 + 18*a**2*f*tan(e/2 + f*x/2)**
8 + 36*a**2*f*tan(e/2 + f*x/2)**7 + 60*a**2*f*tan(e/2 + f*x/2)**6 + 72*a**2*f*tan(e/2 + f*x/2)**5 + 72*a**2*f*
tan(e/2 + f*x/2)**4 + 60*a**2*f*tan(e/2 + f*x/2)**3 + 36*a**2*f*tan(e/2 + f*x/2)**2 + 18*a**2*f*tan(e/2 + f*x/
2) + 6*a**2*f) + 1050*A*c**4*f*x*tan(e/2 + f*x/2)**6/(6*a**2*f*tan(e/2 + f*x/2)**9 + 18*a**2*f*tan(e/2 + f*x/2
)**8 + 36*a**2*f*tan(e/2 + f*x/2)**7 + 60*a**2*f*tan(e/2 + f*x/2)**6 + 72*a**2*f*tan(e/2 + f*x/2)**5 + 72*a**2
*f*tan(e/2 + f*x/2)**4 + 60*a**2*f*tan(e/2 + f*x/2)**3 + 36*a**2*f*tan(e/2 + f*x/2)**2 + 18*a**2*f*tan(e/2 + f
*x/2) + 6*a**2*f) + 1260*A*c**4*f*x*tan(e/2 + f*x/2)**5/(6*a**2*f*tan(e/2 + f*x/2)**9 + 18*a**2*f*tan(e/2 + f*
x/2)**8 + 36*a**2*f*tan(e/2 + f*x/2)**7 + 60*a**2*f*tan(e/2 + f*x/2)**6 + 72*a**2*f*tan(e/2 + f*x/2)**5 + 72*a
**2*f*tan(e/2 + f*x/2)**4 + 60*a**2*f*tan(e/2 + f*x/2)**3 + 36*a**2*f*tan(e/2 + f*x/2)**2 + 18*a**2*f*tan(e/2
+ f*x/2) + 6*a**2*f) + 1260*A*c**4*f*x*tan(e/2 + f*x/2)**4/(6*a**2*f*tan(e/2 + f*x/2)**9 + 18*a**2*f*tan(e/2 +
 f*x/2)**8 + 36*a**2*f*tan(e/2 + f*x/2)**7 + 60*a**2*f*tan(e/2 + f*x/2)**6 + 72*a**2*f*tan(e/2 + f*x/2)**5 + 7
2*a**2*f*tan(e/2 + f*x/2)**4 + 60*a**2*f*tan(e/2 + f*x/2)**3 + 36*a**2*f*tan(e/2 + f*x/2)**2 + 18*a**2*f*tan(e
/2 + f*x/2) + 6*a**2*f) + 1050*A*c**4*f*x*tan(e/2 + f*x/2)**3/(6*a**2*f*tan(e/2 + f*x/2)**9 + 18*a**2*f*tan(e/
2 + f*x/2)**8 + 36*a**2*f*tan(e/2 + f*x/2)**7 + 60*a**2*f*tan(e/2 + f*x/2)**6 + 72*a**2*f*tan(e/2 + f*x/2)**5
+ 72*a**2*f*tan(e/2 + f*x/2)**4 + 60*a**2*f*tan(e/2 + f*x/2)**3 + 36*a**2*f*tan(e/2 + f*x/2)**2 + 18*a**2*f*ta
n(e/2 + f*x/2) + 6*a**2*f) + 630*A*c**4*f*x*tan(e/2 + f*x/2)**2/(6*a**2*f*tan(e/2 + f*x/2)**9 + 18*a**2*f*tan(
e/2 + f*x/2)**8 + 36*a**2*f*tan(e/2 + f*x/2)**7 + 60*a**2*f*tan(e/2 + f*x/2)**6 + 72*a**2*f*tan(e/2 + f*x/2)**
5 + 72*a**2*f*tan(e/2 + f*x/2)**4 + 60*a**2*f*tan(e/2 + f*x/2)**3 + 36*a**2*f*tan(e/2 + f*x/2)**2 + 18*a**2*f*
tan(e/2 + f*x/2) + 6*a**2*f) + 315*A*c**4*f*x*tan(e/2 + f*x/2)/(6*a**2*f*tan(e/2 + f*x/2)**9 + 18*a**2*f*tan(e
/2 + f*x/2)**8 + 36*a**2*f*tan(e/2 + f*x/2)**7 + 60*a**2*f*tan(e/2 + f*x/2)**6 + 72*a**2*f*tan(e/2 + f*x/2)**5
 + 72*a**2*f*tan(e/2 + f*x/2)**4 + 60*a**2*f*tan(e/2 + f*x/2)**3 + 36*a**2*f*tan(e/2 + f*x/2)**2 + 18*a**2*f*t
an(e/2 + f*x/2) + 6*a**2*f) + 105*A*c**4*f*x/(6*a**2*f*tan(e/2 + f*x/2)**9 + 18*a**2*f*tan(e/2 + f*x/2)**8 + 3
6*a**2*f*tan(e/2 + f*x/2)**7 + 60*a**2*f*tan(e/2 + f*x/2)**6 + 72*a**2*f*tan(e/2 + f*x/2)**5 + 72*a**2*f*tan(e
/2 + f*x/2)**4 + 60*a**2*f*tan(e/2 + f*x/2)**3 + 36*a**2*f*tan(e/2 + f*x/2)**2 + 18*a**2*f*tan(e/2 + f*x/2) +
6*a**2*f) + 198*A*c**4*tan(e/2 + f*x/2)**8/(6*a**2*f*tan(e/2 + f*x/2)**9 + 18*a**2*f*tan(e/2 + f*x/2)**8 + 36*
a**2*f*tan(e/2 + f*x/2)**7 + 60*a**2*f*tan(e/2 + f*x/2)**6 + 72*a**2*f*tan(e/2 + f*x/2)**5 + 72*a**2*f*tan(e/2
 + f*x/2)**4 + 60*a**2*f*tan(e/2 + f*x/2)**3 + 36*a**2*f*tan(e/2 + f*x/2)**2 + 18*a**2*f*tan(e/2 + f*x/2) + 6*
a**2*f) + 666*A*c**4*tan(e/2 + f*x/2)**7/(6*a**2*f*tan(e/2 + f*x/2)**9 + 18*a**2*f*tan(e/2 + f*x/2)**8 + 36*a*
*2*f*tan(e/2 + f*x/2)**7 + 60*a**2*f*tan(e/2 + f*x/2)**6 + 72*a**2*f*tan(e/2 + f*x/2)**5 + 72*a**2*f*tan(e/2 +
 f*x/2)**4 + 60*a**2*f*tan(e/2 + f*x/2)**3 + 36*a**2*f*tan(e/2 + f*x/2)**2 + 18*a**2*f*tan(e/2 + f*x/2) + 6*a*
*2*f) + 1066*A*c**4*tan(e/2 + f*x/2)**6/(6*a**2*f*tan(e/2 + f*x/2)**9 + 18*a**2*f*tan(e/2 + f*x/2)**8 + 36*a**
2*f*tan(e/2 + f*x/2)**7 + 60*a**2*f*tan(e/2 + f*x/2)**6 + 72*a**2*f*tan(e/2 + f*x/2)**5 + 72*a**2*f*tan(e/2 +
f*x/2)**4 + 60*a**2*f*tan(e/2 + f*x/2)**3 + 36*a**2*f*tan(e/2 + f*x/2)**2 + 18*a**2*f*tan(e/2 + f*x/2) + 6*a**
2*f) + 2094*A*c**4*tan(e/2 + f*x/2)**5/(6*a**2*f*tan(e/2 + f*x/2)**9 + 18*a**2*f*tan(e/2 + f*x/2)**8 + 36*a**2
*f*tan(e/2 + f*x/2)**7 + 60*a**2*f*tan(e/2 + f*x/2)**6 + 72*a**2*f*tan(e/2 + f*x/2)**5 + 72*a**2*f*tan(e/2 + f
*x/2)**4 + 60*a**2*f*tan(e/2 + f*x/2)**3 + 36*a**2*f*tan(e/2 + f*x/2)**2 + 18*a**2*f*tan(e/2 + f*x/2) + 6*a**2
*f) + 1842*A*c**4*tan(e/2 + f*x/2)**4/(6*a**2*f*tan(e/2 + f*x/2)**9 + 18*a**2*f*tan(e/2 + f*x/2)**8 + 36*a**2*
f*tan(e/2 + f*x/2)**7 + 60*a**2*f*tan(e/2 + f*x/2)**6 + 72*a**2*f*tan(e/2 + f*x/2)**5 + 72*a**2*f*tan(e/2 + f*
x/2)**4 + 60*a**2*f*tan(e/2 + f*x/2)**3 + 36*a**2*f*tan(e/2 + f*x/2)**2 + 18*a**2*f*tan(e/2 + f*x/2) + 6*a**2*
f) + 2214*A*c**4*tan(e/2 + f*x/2)**3/(6*a**2*f*tan(e/2 + f*x/2)**9 + 18*a**2*f*tan(e/2 + f*x/2)**8 + 36*a**2*f
*tan(e/2 + f*x/2)**7 + 60*a**2*f*tan(e/2 + f*x/2)**6 + 72*a**2*f*tan(e/2 + f*x/2)**5 + 72*a**2*f*tan(e/2 + f*x
/2)**4 + 60*a**2*f*tan(e/2 + f*x/2)**3 + 36*a**2*f*tan(e/2 + f*x/2)**2 + 18*a**2*f*tan(e/2 + f*x/2) + 6*a**2*f
) + 1302*A*c**4*tan(e/2 + f*x/2)**2/(6*a**2*f*tan(e/2 + f*x/2)**9 + 18*a**2*f*tan(e/2 + f*x/2)**8 + 36*a**2*f*
tan(e/2 + f*x/2)**7 + 60*a**2*f*tan(e/2 + f*x/2)**6 + 72*a**2*f*tan(e/2 + f*x/2)**5 + 72*a**2*f*tan(e/2 + f*x/
2)**4 + 60*a**2*f*tan(e/2 + f*x/2)**3 + 36*a**2*f*tan(e/2 + f*x/2)**2 + 18*a**2*f*tan(e/2 + f*x/2) + 6*a**2*f)
 + 786*A*c**4*tan(e/2 + f*x/2)/(6*a**2*f*tan(e/2 + f*x/2)**9 + 18*a**2*f*tan(e/2 + f*x/2)**8 + 36*a**2*f*tan(e
/2 + f*x/2)**7 + 60*a**2*f*tan(e/2 + f*x/2)**6 + 72*a**2*f*tan(e/2 + f*x/2)**5 + 72*a**2*f*tan(e/2 + f*x/2)**4
 + 60*a**2*f*tan(e/2 + f*x/2)**3 + 36*a**2*f*tan(e/2 + f*x/2)**2 + 18*a**2*f*tan(e/2 + f*x/2) + 6*a**2*f) + 32
8*A*c**4/(6*a**2*f*tan(e/2 + f*x/2)**9 + 18*a**2*f*tan(e/2 + f*x/2)**8 + 36*a**2*f*tan(e/2 + f*x/2)**7 + 60*a*
*2*f*tan(e/2 + f*x/2)**6 + 72*a**2*f*tan(e/2 + f*x/2)**5 + 72*a**2*f*tan(e/2 + f*x/2)**4 + 60*a**2*f*tan(e/2 +
 f*x/2)**3 + 36*a**2*f*tan(e/2 + f*x/2)**2 + 18*a**2*f*tan(e/2 + f*x/2) + 6*a**2*f) - 210*B*c**4*f*x*tan(e/2 +
 f*x/2)**9/(6*a**2*f*tan(e/2 + f*x/2)**9 + 18*a**2*f*tan(e/2 + f*x/2)**8 + 36*a**2*f*tan(e/2 + f*x/2)**7 + 60*
a**2*f*tan(e/2 + f*x/2)**6 + 72*a**2*f*tan(e/2 + f*x/2)**5 + 72*a**2*f*tan(e/2 + f*x/2)**4 + 60*a**2*f*tan(e/2
 + f*x/2)**3 + 36*a**2*f*tan(e/2 + f*x/2)**2 + 18*a**2*f*tan(e/2 + f*x/2) + 6*a**2*f) - 630*B*c**4*f*x*tan(e/2
 + f*x/2)**8/(6*a**2*f*tan(e/2 + f*x/2)**9 + 18*a**2*f*tan(e/2 + f*x/2)**8 + 36*a**2*f*tan(e/2 + f*x/2)**7 + 6
0*a**2*f*tan(e/2 + f*x/2)**6 + 72*a**2*f*tan(e/2 + f*x/2)**5 + 72*a**2*f*tan(e/2 + f*x/2)**4 + 60*a**2*f*tan(e
/2 + f*x/2)**3 + 36*a**2*f*tan(e/2 + f*x/2)**2 + 18*a**2*f*tan(e/2 + f*x/2) + 6*a**2*f) - 1260*B*c**4*f*x*tan(
e/2 + f*x/2)**7/(6*a**2*f*tan(e/2 + f*x/2)**9 + 18*a**2*f*tan(e/2 + f*x/2)**8 + 36*a**2*f*tan(e/2 + f*x/2)**7
+ 60*a**2*f*tan(e/2 + f*x/2)**6 + 72*a**2*f*tan(e/2 + f*x/2)**5 + 72*a**2*f*tan(e/2 + f*x/2)**4 + 60*a**2*f*ta
n(e/2 + f*x/2)**3 + 36*a**2*f*tan(e/2 + f*x/2)**2 + 18*a**2*f*tan(e/2 + f*x/2) + 6*a**2*f) - 2100*B*c**4*f*x*t
an(e/2 + f*x/2)**6/(6*a**2*f*tan(e/2 + f*x/2)**9 + 18*a**2*f*tan(e/2 + f*x/2)**8 + 36*a**2*f*tan(e/2 + f*x/2)*
*7 + 60*a**2*f*tan(e/2 + f*x/2)**6 + 72*a**2*f*tan(e/2 + f*x/2)**5 + 72*a**2*f*tan(e/2 + f*x/2)**4 + 60*a**2*f
*tan(e/2 + f*x/2)**3 + 36*a**2*f*tan(e/2 + f*x/2)**2 + 18*a**2*f*tan(e/2 + f*x/2) + 6*a**2*f) - 2520*B*c**4*f*
x*tan(e/2 + f*x/2)**5/(6*a**2*f*tan(e/2 + f*x/2)**9 + 18*a**2*f*tan(e/2 + f*x/2)**8 + 36*a**2*f*tan(e/2 + f*x/
2)**7 + 60*a**2*f*tan(e/2 + f*x/2)**6 + 72*a**2*f*tan(e/2 + f*x/2)**5 + 72*a**2*f*tan(e/2 + f*x/2)**4 + 60*a**
2*f*tan(e/2 + f*x/2)**3 + 36*a**2*f*tan(e/2 + f*x/2)**2 + 18*a**2*f*tan(e/2 + f*x/2) + 6*a**2*f) - 2520*B*c**4
*f*x*tan(e/2 + f*x/2)**4/(6*a**2*f*tan(e/2 + f*x/2)**9 + 18*a**2*f*tan(e/2 + f*x/2)**8 + 36*a**2*f*tan(e/2 + f
*x/2)**7 + 60*a**2*f*tan(e/2 + f*x/2)**6 + 72*a**2*f*tan(e/2 + f*x/2)**5 + 72*a**2*f*tan(e/2 + f*x/2)**4 + 60*
a**2*f*tan(e/2 + f*x/2)**3 + 36*a**2*f*tan(e/2 + f*x/2)**2 + 18*a**2*f*tan(e/2 + f*x/2) + 6*a**2*f) - 2100*B*c
**4*f*x*tan(e/2 + f*x/2)**3/(6*a**2*f*tan(e/2 + f*x/2)**9 + 18*a**2*f*tan(e/2 + f*x/2)**8 + 36*a**2*f*tan(e/2
+ f*x/2)**7 + 60*a**2*f*tan(e/2 + f*x/2)**6 + 72*a**2*f*tan(e/2 + f*x/2)**5 + 72*a**2*f*tan(e/2 + f*x/2)**4 +
60*a**2*f*tan(e/2 + f*x/2)**3 + 36*a**2*f*tan(e/2 + f*x/2)**2 + 18*a**2*f*tan(e/2 + f*x/2) + 6*a**2*f) - 1260*
B*c**4*f*x*tan(e/2 + f*x/2)**2/(6*a**2*f*tan(e/2 + f*x/2)**9 + 18*a**2*f*tan(e/2 + f*x/2)**8 + 36*a**2*f*tan(e
/2 + f*x/2)**7 + 60*a**2*f*tan(e/2 + f*x/2)**6 + 72*a**2*f*tan(e/2 + f*x/2)**5 + 72*a**2*f*tan(e/2 + f*x/2)**4
 + 60*a**2*f*tan(e/2 + f*x/2)**3 + 36*a**2*f*tan(e/2 + f*x/2)**2 + 18*a**2*f*tan(e/2 + f*x/2) + 6*a**2*f) - 63
0*B*c**4*f*x*tan(e/2 + f*x/2)/(6*a**2*f*tan(e/2 + f*x/2)**9 + 18*a**2*f*tan(e/2 + f*x/2)**8 + 36*a**2*f*tan(e/
2 + f*x/2)**7 + 60*a**2*f*tan(e/2 + f*x/2)**6 + 72*a**2*f*tan(e/2 + f*x/2)**5 + 72*a**2*f*tan(e/2 + f*x/2)**4
+ 60*a**2*f*tan(e/2 + f*x/2)**3 + 36*a**2*f*tan(e/2 + f*x/2)**2 + 18*a**2*f*tan(e/2 + f*x/2) + 6*a**2*f) - 210
*B*c**4*f*x/(6*a**2*f*tan(e/2 + f*x/2)**9 + 18*a**2*f*tan(e/2 + f*x/2)**8 + 36*a**2*f*tan(e/2 + f*x/2)**7 + 60
*a**2*f*tan(e/2 + f*x/2)**6 + 72*a**2*f*tan(e/2 + f*x/2)**5 + 72*a**2*f*tan(e/2 + f*x/2)**4 + 60*a**2*f*tan(e/
2 + f*x/2)**3 + 36*a**2*f*tan(e/2 + f*x/2)**2 + 18*a**2*f*tan(e/2 + f*x/2) + 6*a**2*f) - 420*B*c**4*tan(e/2 +
f*x/2)**8/(6*a**2*f*tan(e/2 + f*x/2)**9 + 18*a**2*f*tan(e/2 + f*x/2)**8 + 36*a**2*f*tan(e/2 + f*x/2)**7 + 60*a
**2*f*tan(e/2 + f*x/2)**6 + 72*a**2*f*tan(e/2 + f*x/2)**5 + 72*a**2*f*tan(e/2 + f*x/2)**4 + 60*a**2*f*tan(e/2
+ f*x/2)**3 + 36*a**2*f*tan(e/2 + f*x/2)**2 + 18*a**2*f*tan(e/2 + f*x/2) + 6*a**2*f) - 1272*B*c**4*tan(e/2 + f
*x/2)**7/(6*a**2*f*tan(e/2 + f*x/2)**9 + 18*a**2*f*tan(e/2 + f*x/2)**8 + 36*a**2*f*tan(e/2 + f*x/2)**7 + 60*a*
*2*f*tan(e/2 + f*x/2)**6 + 72*a**2*f*tan(e/2 + f*x/2)**5 + 72*a**2*f*tan(e/2 + f*x/2)**4 + 60*a**2*f*tan(e/2 +
 f*x/2)**3 + 36*a**2*f*tan(e/2 + f*x/2)**2 + 18*a**2*f*tan(e/2 + f*x/2) + 6*a**2*f) - 2320*B*c**4*tan(e/2 + f*
x/2)**6/(6*a**2*f*tan(e/2 + f*x/2)**9 + 18*a**2*f*tan(e/2 + f*x/2)**8 + 36*a**2*f*tan(e/2 + f*x/2)**7 + 60*a**
2*f*tan(e/2 + f*x/2)**6 + 72*a**2*f*tan(e/2 + f*x/2)**5 + 72*a**2*f*tan(e/2 + f*x/2)**4 + 60*a**2*f*tan(e/2 +
f*x/2)**3 + 36*a**2*f*tan(e/2 + f*x/2)**2 + 18*a**2*f*tan(e/2 + f*x/2) + 6*a**2*f) - 3960*B*c**4*tan(e/2 + f*x
/2)**5/(6*a**2*f*tan(e/2 + f*x/2)**9 + 18*a**2*f*tan(e/2 + f*x/2)**8 + 36*a**2*f*tan(e/2 + f*x/2)**7 + 60*a**2
*f*tan(e/2 + f*x/2)**6 + 72*a**2*f*tan(e/2 + f*x/2)**5 + 72*a**2*f*tan(e/2 + f*x/2)**4 + 60*a**2*f*tan(e/2 + f
*x/2)**3 + 36*a**2*f*tan(e/2 + f*x/2)**2 + 18*a**2*f*tan(e/2 + f*x/2) + 6*a**2*f) - 3960*B*c**4*tan(e/2 + f*x/
2)**4/(6*a**2*f*tan(e/2 + f*x/2)**9 + 18*a**2*f*tan(e/2 + f*x/2)**8 + 36*a**2*f*tan(e/2 + f*x/2)**7 + 60*a**2*
f*tan(e/2 + f*x/2)**6 + 72*a**2*f*tan(e/2 + f*x/2)**5 + 72*a**2*f*tan(e/2 + f*x/2)**4 + 60*a**2*f*tan(e/2 + f*
x/2)**3 + 36*a**2*f*tan(e/2 + f*x/2)**2 + 18*a**2*f*tan(e/2 + f*x/2) + 6*a**2*f) - 4280*B*c**4*tan(e/2 + f*x/2
)**3/(6*a**2*f*tan(e/2 + f*x/2)**9 + 18*a**2*f*tan(e/2 + f*x/2)**8 + 36*a**2*f*tan(e/2 + f*x/2)**7 + 60*a**2*f
*tan(e/2 + f*x/2)**6 + 72*a**2*f*tan(e/2 + f*x/2)**5 + 72*a**2*f*tan(e/2 + f*x/2)**4 + 60*a**2*f*tan(e/2 + f*x
/2)**3 + 36*a**2*f*tan(e/2 + f*x/2)**2 + 18*a**2*f*tan(e/2 + f*x/2) + 6*a**2*f) - 2688*B*c**4*tan(e/2 + f*x/2)
**2/(6*a**2*f*tan(e/2 + f*x/2)**9 + 18*a**2*f*tan(e/2 + f*x/2)**8 + 36*a**2*f*tan(e/2 + f*x/2)**7 + 60*a**2*f*
tan(e/2 + f*x/2)**6 + 72*a**2*f*tan(e/2 + f*x/2)**5 + 72*a**2*f*tan(e/2 + f*x/2)**4 + 60*a**2*f*tan(e/2 + f*x/
2)**3 + 36*a**2*f*tan(e/2 + f*x/2)**2 + 18*a**2*f*tan(e/2 + f*x/2) + 6*a**2*f) - 1560*B*c**4*tan(e/2 + f*x/2)/
(6*a**2*f*tan(e/2 + f*x/2)**9 + 18*a**2*f*tan(e/2 + f*x/2)**8 + 36*a**2*f*tan(e/2 + f*x/2)**7 + 60*a**2*f*tan(
e/2 + f*x/2)**6 + 72*a**2*f*tan(e/2 + f*x/2)**5 + 72*a**2*f*tan(e/2 + f*x/2)**4 + 60*a**2*f*tan(e/2 + f*x/2)**
3 + 36*a**2*f*tan(e/2 + f*x/2)**2 + 18*a**2*f*tan(e/2 + f*x/2) + 6*a**2*f) - 660*B*c**4/(6*a**2*f*tan(e/2 + f*
x/2)**9 + 18*a**2*f*tan(e/2 + f*x/2)**8 + 36*a**2*f*tan(e/2 + f*x/2)**7 + 60*a**2*f*tan(e/2 + f*x/2)**6 + 72*a
**2*f*tan(e/2 + f*x/2)**5 + 72*a**2*f*tan(e/2 + f*x/2)**4 + 60*a**2*f*tan(e/2 + f*x/2)**3 + 36*a**2*f*tan(e/2
+ f*x/2)**2 + 18*a**2*f*tan(e/2 + f*x/2) + 6*a**2*f), Ne(f, 0)), (x*(A + B*sin(e))*(-c*sin(e) + c)**4/(a*sin(e
) + a)**2, True))

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 2094 vs. \(2 (172) = 344\).

Time = 0.35 (sec) , antiderivative size = 2094, normalized size of antiderivative = 11.63 \[ \int \frac {(A+B \sin (e+f x)) (c-c \sin (e+f x))^4}{(a+a \sin (e+f x))^2} \, dx=\text {Too large to display} \]

[In]

integrate((A+B*sin(f*x+e))*(c-c*sin(f*x+e))^4/(a+a*sin(f*x+e))^2,x, algorithm="maxima")

[Out]

1/3*(A*c^4*((75*sin(f*x + e)/(cos(f*x + e) + 1) + 97*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 126*sin(f*x + e)^3/
(cos(f*x + e) + 1)^3 + 98*sin(f*x + e)^4/(cos(f*x + e) + 1)^4 + 63*sin(f*x + e)^5/(cos(f*x + e) + 1)^5 + 21*si
n(f*x + e)^6/(cos(f*x + e) + 1)^6 + 32)/(a^2 + 3*a^2*sin(f*x + e)/(cos(f*x + e) + 1) + 5*a^2*sin(f*x + e)^2/(c
os(f*x + e) + 1)^2 + 7*a^2*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + 7*a^2*sin(f*x + e)^4/(cos(f*x + e) + 1)^4 + 5
*a^2*sin(f*x + e)^5/(cos(f*x + e) + 1)^5 + 3*a^2*sin(f*x + e)^6/(cos(f*x + e) + 1)^6 + a^2*sin(f*x + e)^7/(cos
(f*x + e) + 1)^7) + 21*arctan(sin(f*x + e)/(cos(f*x + e) + 1))/a^2) - 4*B*c^4*((75*sin(f*x + e)/(cos(f*x + e)
+ 1) + 97*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 126*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + 98*sin(f*x + e)^4/(c
os(f*x + e) + 1)^4 + 63*sin(f*x + e)^5/(cos(f*x + e) + 1)^5 + 21*sin(f*x + e)^6/(cos(f*x + e) + 1)^6 + 32)/(a^
2 + 3*a^2*sin(f*x + e)/(cos(f*x + e) + 1) + 5*a^2*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 7*a^2*sin(f*x + e)^3/(
cos(f*x + e) + 1)^3 + 7*a^2*sin(f*x + e)^4/(cos(f*x + e) + 1)^4 + 5*a^2*sin(f*x + e)^5/(cos(f*x + e) + 1)^5 +
3*a^2*sin(f*x + e)^6/(cos(f*x + e) + 1)^6 + a^2*sin(f*x + e)^7/(cos(f*x + e) + 1)^7) + 21*arctan(sin(f*x + e)/
(cos(f*x + e) + 1))/a^2) - 2*B*c^4*((57*sin(f*x + e)/(cos(f*x + e) + 1) + 99*sin(f*x + e)^2/(cos(f*x + e) + 1)
^2 + 155*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + 153*sin(f*x + e)^4/(cos(f*x + e) + 1)^4 + 135*sin(f*x + e)^5/(c
os(f*x + e) + 1)^5 + 85*sin(f*x + e)^6/(cos(f*x + e) + 1)^6 + 45*sin(f*x + e)^7/(cos(f*x + e) + 1)^7 + 15*sin(
f*x + e)^8/(cos(f*x + e) + 1)^8 + 24)/(a^2 + 3*a^2*sin(f*x + e)/(cos(f*x + e) + 1) + 6*a^2*sin(f*x + e)^2/(cos
(f*x + e) + 1)^2 + 10*a^2*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + 12*a^2*sin(f*x + e)^4/(cos(f*x + e) + 1)^4 + 1
2*a^2*sin(f*x + e)^5/(cos(f*x + e) + 1)^5 + 10*a^2*sin(f*x + e)^6/(cos(f*x + e) + 1)^6 + 6*a^2*sin(f*x + e)^7/
(cos(f*x + e) + 1)^7 + 3*a^2*sin(f*x + e)^8/(cos(f*x + e) + 1)^8 + a^2*sin(f*x + e)^9/(cos(f*x + e) + 1)^9) +
15*arctan(sin(f*x + e)/(cos(f*x + e) + 1))/a^2) + 16*A*c^4*((12*sin(f*x + e)/(cos(f*x + e) + 1) + 11*sin(f*x +
 e)^2/(cos(f*x + e) + 1)^2 + 9*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + 3*sin(f*x + e)^4/(cos(f*x + e) + 1)^4 + 5
)/(a^2 + 3*a^2*sin(f*x + e)/(cos(f*x + e) + 1) + 4*a^2*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 4*a^2*sin(f*x + e
)^3/(cos(f*x + e) + 1)^3 + 3*a^2*sin(f*x + e)^4/(cos(f*x + e) + 1)^4 + a^2*sin(f*x + e)^5/(cos(f*x + e) + 1)^5
) + 3*arctan(sin(f*x + e)/(cos(f*x + e) + 1))/a^2) - 24*B*c^4*((12*sin(f*x + e)/(cos(f*x + e) + 1) + 11*sin(f*
x + e)^2/(cos(f*x + e) + 1)^2 + 9*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + 3*sin(f*x + e)^4/(cos(f*x + e) + 1)^4
+ 5)/(a^2 + 3*a^2*sin(f*x + e)/(cos(f*x + e) + 1) + 4*a^2*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 4*a^2*sin(f*x
+ e)^3/(cos(f*x + e) + 1)^3 + 3*a^2*sin(f*x + e)^4/(cos(f*x + e) + 1)^4 + a^2*sin(f*x + e)^5/(cos(f*x + e) + 1
)^5) + 3*arctan(sin(f*x + e)/(cos(f*x + e) + 1))/a^2) + 12*A*c^4*((9*sin(f*x + e)/(cos(f*x + e) + 1) + 3*sin(f
*x + e)^2/(cos(f*x + e) + 1)^2 + 4)/(a^2 + 3*a^2*sin(f*x + e)/(cos(f*x + e) + 1) + 3*a^2*sin(f*x + e)^2/(cos(f
*x + e) + 1)^2 + a^2*sin(f*x + e)^3/(cos(f*x + e) + 1)^3) + 3*arctan(sin(f*x + e)/(cos(f*x + e) + 1))/a^2) - 8
*B*c^4*((9*sin(f*x + e)/(cos(f*x + e) + 1) + 3*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 4)/(a^2 + 3*a^2*sin(f*x +
 e)/(cos(f*x + e) + 1) + 3*a^2*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + a^2*sin(f*x + e)^3/(cos(f*x + e) + 1)^3)
+ 3*arctan(sin(f*x + e)/(cos(f*x + e) + 1))/a^2) - 2*A*c^4*(3*sin(f*x + e)/(cos(f*x + e) + 1) + 3*sin(f*x + e)
^2/(cos(f*x + e) + 1)^2 + 2)/(a^2 + 3*a^2*sin(f*x + e)/(cos(f*x + e) + 1) + 3*a^2*sin(f*x + e)^2/(cos(f*x + e)
 + 1)^2 + a^2*sin(f*x + e)^3/(cos(f*x + e) + 1)^3) + 8*A*c^4*(3*sin(f*x + e)/(cos(f*x + e) + 1) + 1)/(a^2 + 3*
a^2*sin(f*x + e)/(cos(f*x + e) + 1) + 3*a^2*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + a^2*sin(f*x + e)^3/(cos(f*x
+ e) + 1)^3) - 2*B*c^4*(3*sin(f*x + e)/(cos(f*x + e) + 1) + 1)/(a^2 + 3*a^2*sin(f*x + e)/(cos(f*x + e) + 1) +
3*a^2*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + a^2*sin(f*x + e)^3/(cos(f*x + e) + 1)^3))/f

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 349 vs. \(2 (172) = 344\).

Time = 0.33 (sec) , antiderivative size = 349, normalized size of antiderivative = 1.94 \[ \int \frac {(A+B \sin (e+f x)) (c-c \sin (e+f x))^4}{(a+a \sin (e+f x))^2} \, dx=\frac {\frac {105 \, {\left (A c^{4} - 2 \, B c^{4}\right )} {\left (f x + e\right )}}{a^{2}} + \frac {2 \, {\left (99 \, A c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{8} - 210 \, B c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{8} + 333 \, A c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{7} - 636 \, B c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{7} + 533 \, A c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{6} - 1160 \, B c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{6} + 1047 \, A c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} - 1980 \, B c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} + 921 \, A c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 1980 \, B c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} + 1107 \, A c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 2140 \, B c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 651 \, A c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 1344 \, B c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 393 \, A c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 780 \, B c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 164 \, A c^{4} - 330 \, B c^{4}\right )}}{{\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}^{3} a^{2}}}{6 \, f} \]

[In]

integrate((A+B*sin(f*x+e))*(c-c*sin(f*x+e))^4/(a+a*sin(f*x+e))^2,x, algorithm="giac")

[Out]

1/6*(105*(A*c^4 - 2*B*c^4)*(f*x + e)/a^2 + 2*(99*A*c^4*tan(1/2*f*x + 1/2*e)^8 - 210*B*c^4*tan(1/2*f*x + 1/2*e)
^8 + 333*A*c^4*tan(1/2*f*x + 1/2*e)^7 - 636*B*c^4*tan(1/2*f*x + 1/2*e)^7 + 533*A*c^4*tan(1/2*f*x + 1/2*e)^6 -
1160*B*c^4*tan(1/2*f*x + 1/2*e)^6 + 1047*A*c^4*tan(1/2*f*x + 1/2*e)^5 - 1980*B*c^4*tan(1/2*f*x + 1/2*e)^5 + 92
1*A*c^4*tan(1/2*f*x + 1/2*e)^4 - 1980*B*c^4*tan(1/2*f*x + 1/2*e)^4 + 1107*A*c^4*tan(1/2*f*x + 1/2*e)^3 - 2140*
B*c^4*tan(1/2*f*x + 1/2*e)^3 + 651*A*c^4*tan(1/2*f*x + 1/2*e)^2 - 1344*B*c^4*tan(1/2*f*x + 1/2*e)^2 + 393*A*c^
4*tan(1/2*f*x + 1/2*e) - 780*B*c^4*tan(1/2*f*x + 1/2*e) + 164*A*c^4 - 330*B*c^4)/((tan(1/2*f*x + 1/2*e)^3 + ta
n(1/2*f*x + 1/2*e)^2 + tan(1/2*f*x + 1/2*e) + 1)^3*a^2))/f

Mupad [B] (verification not implemented)

Time = 15.04 (sec) , antiderivative size = 414, normalized size of antiderivative = 2.30 \[ \int \frac {(A+B \sin (e+f x)) (c-c \sin (e+f x))^4}{(a+a \sin (e+f x))^2} \, dx=\frac {\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (131\,A\,c^4-260\,B\,c^4\right )+\frac {164\,A\,c^4}{3}-110\,B\,c^4+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^8\,\left (33\,A\,c^4-70\,B\,c^4\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^7\,\left (111\,A\,c^4-212\,B\,c^4\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\left (217\,A\,c^4-448\,B\,c^4\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4\,\left (307\,A\,c^4-660\,B\,c^4\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5\,\left (349\,A\,c^4-660\,B\,c^4\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6\,\left (\frac {533\,A\,c^4}{3}-\frac {1160\,B\,c^4}{3}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3\,\left (369\,A\,c^4-\frac {2140\,B\,c^4}{3}\right )}{f\,\left (a^2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^9+3\,a^2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^8+6\,a^2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^7+10\,a^2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6+12\,a^2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5+12\,a^2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4+10\,a^2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3+6\,a^2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+3\,a^2\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )+a^2\right )}+\frac {35\,c^4\,\mathrm {atan}\left (\frac {35\,c^4\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (A-2\,B\right )}{35\,A\,c^4-70\,B\,c^4}\right )\,\left (A-2\,B\right )}{a^2\,f} \]

[In]

int(((A + B*sin(e + f*x))*(c - c*sin(e + f*x))^4)/(a + a*sin(e + f*x))^2,x)

[Out]

(tan(e/2 + (f*x)/2)*(131*A*c^4 - 260*B*c^4) + (164*A*c^4)/3 - 110*B*c^4 + tan(e/2 + (f*x)/2)^8*(33*A*c^4 - 70*
B*c^4) + tan(e/2 + (f*x)/2)^7*(111*A*c^4 - 212*B*c^4) + tan(e/2 + (f*x)/2)^2*(217*A*c^4 - 448*B*c^4) + tan(e/2
 + (f*x)/2)^4*(307*A*c^4 - 660*B*c^4) + tan(e/2 + (f*x)/2)^5*(349*A*c^4 - 660*B*c^4) + tan(e/2 + (f*x)/2)^6*((
533*A*c^4)/3 - (1160*B*c^4)/3) + tan(e/2 + (f*x)/2)^3*(369*A*c^4 - (2140*B*c^4)/3))/(f*(6*a^2*tan(e/2 + (f*x)/
2)^2 + 10*a^2*tan(e/2 + (f*x)/2)^3 + 12*a^2*tan(e/2 + (f*x)/2)^4 + 12*a^2*tan(e/2 + (f*x)/2)^5 + 10*a^2*tan(e/
2 + (f*x)/2)^6 + 6*a^2*tan(e/2 + (f*x)/2)^7 + 3*a^2*tan(e/2 + (f*x)/2)^8 + a^2*tan(e/2 + (f*x)/2)^9 + a^2 + 3*
a^2*tan(e/2 + (f*x)/2))) + (35*c^4*atan((35*c^4*tan(e/2 + (f*x)/2)*(A - 2*B))/(35*A*c^4 - 70*B*c^4))*(A - 2*B)
)/(a^2*f)